﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using DiscoveryLogic.Analytics.Modules.Diagrams.GravityDiagrams;
using System.Windows.Media;

namespace DiscoveryLogic.Analytics.Modules.Diagrams.Renders
{
    /// <summary>
    /// straight line
    /// </summary>
    public class RubberBand : ISpringRenderer
    {
        #region props
        private Pen _Pen;
        /// <summary></summary>
        public Pen Pen
        {
            get
            {
                return this._Pen;
            }
            set
            {
                this._Pen = value;
            }
        }
        #endregion

        #region ctor
        public RubberBand(System.Windows.Media.Pen pen)
        {
            this._Pen = pen;
        }
        #endregion

        #region Implementation of ISpringRenderer

        /// <summary>
        /// 
        /// </summary>
        /// <param name="spring"></param>
        /// <param name="dc"></param>
        public void Render(Spring spring, DrawingContext dc)
        {
            dc.DrawLine(this._Pen, spring.From.Position.ToPoint(), spring.To.Position.ToPoint());
        }

        #endregion
    }
}
